In the context of Bolivia, similar to many other developing nations, the availability of data pertaining to GDP or other economic activity indicators is constrained by various limitations such as delayed publication, inadequate disaggregation, and low frequency. Despite the existence of quarterly GDP time series and the monthly Global Index of Economic Activity (IGAE, for its Spanish acronym) in Bolivia, they are typically released with a delay of three to six months.
In response to these constraints, this article proposes a monthly GDP nowcast indicator for the Bolivian economy. The terminology of Giannone et al. (2008) and Banbura et al. (2013) is assumed to define nowcasting as “forecasting values of a time series not published by official sources for the current period”.1
The findings demonstrate that the Bolivian economy is projected to have expanded by 3.23% by the conclusion of 2022. Despite the indicator of monthly economic activity, namely the IGAE, displaying a cumulative growth of 4.3% until September, there has been a deceleration in overall economic activity since October. This slowdown can be largely attributed to the partial cessation of economic activity resulting from the civil strikes originated in the department of Santa Cruz, which is one of the regions that significantly contributes to national production.2
The present analysis indicates that the recent social conflicts have had a discernible impact on economic activity. Specifically, the data suggests that there was a modest growth of 0.4% in October followed by a notable decline of 2% in November, when compared to analogous periods in the preceding year.
Methodologically, machine learning algorithms have been effectively utilized to nowcast Bolivia’s monthly economic activity. The use of machine learning techniques has enabled the identification of patterns and the extraction of meaningful insights from complex datasets. The results of this approach have led to more accurate and timely projections of economic activity, which is an invaluable tool for decision-making and resource allocation. By leveraging the computational power of machine learning, economists and researchers can obtain more reliable and robust predictions that contribute to a better understanding of current economic conditions and trends.
The monthly GDP nowcast for Bolivia is the result of averaging three machine learning forecasts of the monthly Global Index of Economic Activity (IGAE). Gradient Boosting Regressor, Ada Boost Regressor, and Random Forest Regression are the algorithms used to forecast the IGAE; they were selected after a k-fold cross-validation process in which other algorithms were also tested.
First, the target value is the monthly Global Index of Economic Activity (\(y\)). Second, about 50 monthly variables were used as potential predictors of the target variable (\(\mathbf{X}\)), including current and lagged variables of the economic indicators published by the National Institute of Statistics of Bolivia (i.e., disaggregated information on production and consumption by sectors and activities), export and import data, indicators of the financial, fiscal and monetary system, and variables on domestic and commodity prices.
This sample spans from January 2007 to September 2022. In order to implement k-fold cross-validation and select the most suitable algorithms to predict IGAE, the sample was divided into 3 subsamples: i) training set; ii) validation set; and iii) test set. The training set corresponds to the period 2007M1-2017M12, the validation set comprises the time interval 2018M1-2022M9, and the test set (i.e. nowcast period) 2022M10-2022M12.
Lastly, all variables are z-score normalized. That is, variables have a mean of 0 and a standard deviation of 1. To implement z-score normalization, input values are adjusted as shown in this formula: \[x^{(i)}_j = \dfrac{x^{(i)}_j - \mu_j}{\sigma_j} \tag{4}\] where \(j\) selects a variable or a column in the \(\mathbf{X}\) matrix. \(µ_j\) is the mean of all the values for variable (\(j\)) and \(\sigma_j\) is the standard deviation of variable (\(j\)) from the training set.
The application of machine learning algorithms for nowcasting Bolivia’s monthly economic activity has been favored due to their superior predictive power in comparison to traditional statistical models. Nonetheless, given the wide range of machine learning algorithms that could be suitable for this purpose, a k-fold cross-validation process is implemented to identify the most appropriate ones.
K-fold cross-validation is a widely used technique to assess the predictive performance of machine learning algorithms. The procedure involves partitioning the dataset into k equally sized subsets or “folds”. One of the folds is then reserved for validation, while the remaining k-1 folds are utilized for algorithm training. This process is iterated k times, with each iteration selecting a different fold for validation and using the other k-1 folds for training. Subsequently, the results of each iteration are averaged to obtain an overall performance metric, such as accuracy or mean squared error. This method helps to mitigate the bias that may arise from testing the algorithm’s performance on a specific dataset, which can lead to overfitting or underfitting.
In this context, the predictive capacity of the following machine learning algorithms is assessed using k-fold cross-validation (with \(k=10\)), providing a more comprehensive evaluation of their effectiveness.
The results show that Gradient Boosting Regressor, Ada Boost Regressor, and Random Forest Regression have the lowest mean squared errors. Therefore, these three algorithms are selected as the most suitable for predicting IGAE.
| Model | Mean | SD |
|---|---|---|
| Linear | -0.34 | 0.20 |
| Lasso | -1.00 | 0.13 |
| ElasticNet | -0.48 | 0.08 |
| Ridge | -0.22 | 0.14 |
| Bayesian Ridge | -0.14 | 0.11 |
| KNN | -0.15 | 0.09 |
| Decision Tree | -0.08 | 0.04 |
| SVR | -0.27 | 0.17 |
| AdaBoost | -0.04 | 0.02 |
| Gradient Boost | -0.05 | 0.04 |
| Random Forest | -0.05 | 0.04 |
For the training span, the plot below compares the IGAE observations with the predictions of the selected algorithms, and they are quite similar.
Finally, the average of the predictions from Gradient Boosting Regressor, Ada Boost Regressor, and Random Forest Regression is the final nowcast indicator.
Banbura, M., Giannone, D., Modugno, M. & Reichlin, L. (2013). Now-casting and the realtime data flow. Handbook of economic forecasting (pp. 195-237). Elsevier.
Giannone, D., Reichlin, L. & Small, D. (2008). Nowcasting: The real-time informational content of macroeconomic data. Journal of Monetary Economics, 55(4), 665-676. https://doi.org/10.1016/j.jmoneco.2008.05.010↩︎
News regarding the civic strikes that occurred in Santa Cruz during the months of October and November 2022 can be accessed in link1 and link2.↩︎